<template>
    <div class="bottom-bar">
        <div class="iconList">
            <div>
                <svg class="icon" aria-hidden="true">
                    <use xlink:href="#icon-kefu"></use>
                </svg>
                <span>客服</span>
            </div>
            <div>
                <svg class="icon" aria-hidden="true">
                    <use xlink:href="#icon-dianpu"></use>
                </svg>
                <span>店铺</span>
            </div>
            <div>
                <svg class="icon" aria-hidden="true">
                    <use xlink:href="#icon-shoucang1"></use>
                </svg>
                <span>收藏</span>
            </div>
        </div>
        <div class="buyButton">
            <span @click="clickBuy">加入购物车</span>
            <span>立即购买</span>
        </div>
    </div>
</template>

<script>
    export default {
        methods:{
            clickBuy(){
                this.$emit("clickAddBuy")
            }
        }
    }
</script>

<style scoped>
    .bottom-bar{
        height: 49px;
        position: fixed;
        bottom: 0;
        z-index: 1;
        background: #ffffff;
        width: 100vw;
        display: flex;
        box-shadow: 0 -1px 1px rgba(100, 100, 100, .1)
    }
    .iconList,.buyButton{
        flex: 1;
        display: flex;
        align-items: center;
        text-align: center;
    }
    .iconList>div,.buyButton>span{
        flex: 1;
    }
    .iconList span{
        font-size: .8rem;
    }
    .iconList>div>svg{
        font-size: 1.7rem;
        width:100%;
    }
    .buyButton>span{
        color: #ffffff;
        height: 100%;
        line-height: 49px;
        font-size: .9rem;
    }
    .buyButton>span:first-child{
        background: #e67e22
    }
    .buyButton>span:last-child{
        background: #8e44ad;
    }
</style>